    package com.application;

    import android.os.Bundle;

    import androidx.appcompat.app.AppCompatActivity;
    import androidx.databinding.DataBindingUtil;

    import com.alibaba.android.arouter.facade.annotation.Route;
    import com.application.databinding.ActivityLiveEventBusSubBinding;
    import com.application.util.ARouterConstants;
    import com.jeremyliao.liveeventbus.LiveEventBus;

    @Route(path = ARouterConstants.ACTIVITY_URL_LIVE_EVENT_BUS_SUB)
    public class LiveEventBusSubActivity extends AppCompatActivity {

        private ActivityLiveEventBusSubBinding binding;

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            binding= DataBindingUtil.setContentView(this,R.layout.activity_live_event_bus_sub);
            binding.setActivity(this);

            binding.btStartLiveEventBus.setOnClickListener(v -> LiveEventBus.get("subResult",String.class)
                    .post(getString(R.string.Subscribed)));

        }
    }